<!-- $version must be assigned outside of if statement for variable scope purposes.
  Default to "k8s_api_version" version. -->
{{- $version := $.Page.Site.Params.k8s_api_version }}
{{- if and (ne (getenv "HUGO_ENV") "production") (ne (getenv "HUGO_ENV") "snapshot")}}
{{- $version = $.Page.Site.Params.dev_k8s_api_version }}
{{- end}}
{{- $prefix := replace $version "." "-" }}https://v{{- $prefix
}}.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v{{- $version }}/{{- .Get "href" -}}
